package xmltx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import xmltx.service.BookService;

@Controller
public class BookController {
    @Autowired
    private BookService bookService;

    //单次买书的方法 传递图书id与用户id
    public void buyBook(Integer bookId,Integer userId){
        //调用service方法
        bookService.buyBook(bookId,userId);
    }

}
